package pers.smalltown.ourspace.record;

import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OurRecordDao {
	@Select("select * from our_record where id=${id}")
	public Record selectRecord(int id);

	public Record selectById(int id);
	
	public int insertDemo(int id);
	
	public int insertBatch(List<Record> list);
	
	public List<Record> selectOneDayByDate(QueryDate date);

	@Select("select * from our_record where content like '%${contentPart}%' order by datetime asc")
	public List<Record> selectByContent(String contentPart);

	public List<RecordStatistic> statisticByContent(String contentPart);
	
	@Select("select * from our_record where content = #{content} and datetime = #{datetime} ")
	public Record judgeExist(Record record);
}
